:root {
    --primary-color: #FFD700;
    --secondary-color: #ffffff;
    --success-color: #ffffff;
    --light-bg: #f8f9fc;
    --border-color: #FFD700;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fb;
    color: #333;
}


.edit-mode .add-product-header h2 {
    color: #4a6cf7;
}

.edit-mode .add-product-header i {
    color: #4a6cf7;
}

.main-content {
    max-width: 1200px;
    margin: auto 40px;
    padding: 0 15px;
}

.add-product-header {
    background: white;
    border-radius: 10px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
}

.add-product-header h2 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 8px;
}

.add-product-header p {
    color: var(--secondary-color);
    margin-bottom: 0;
}

.form-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.section-title i {
    margin-right: 10px;
    font-size: 1.1em;
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #4a4a4a;
}

.form-label.required::after {
    content: " *";
    color: #e74a3b;
}

.image-upload-container {
    border: 2px dashed #d1d3e2;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background-color: var(--light-bg);
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.image-upload-container:hover, .image-upload-container.dragover {
    border-color: var(--primary-color);
    background-color: #ffffff;
}

.image-upload-container i {
    font-size: 48px;
    color: #d1d3e2;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.image-upload-container:hover i {
    color: var(--primary-color);
    transform: translateY(-5px);
}

.image-upload-container h5 {
    font-weight: 600;
    color: #4a4a4a;
    margin-bottom: 8px;
}

.image-upload-container p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.image-preview {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fc;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-preview .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(231, 74, 59, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    transform: scale(0.8);
}

.image-preview:hover .delete-btn {
    opacity: 1;
    transform: scale(1.1);
}

.image-preview.main-image::after {
    content: '主图';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 12px;
    text-align: center;
    padding: 3px 0;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.tag-item {
    background: #e8d671;
    color: #4a4a4a;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag-item .remove-tag {
    cursor: pointer;
    color: #1f1f1f;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.tag-item .remove-tag:hover {
    color: #e74a3b;
    transform: scale(1.1);
}

.tag-input {
    display: flex;
    gap: 10px;
}

.tag-input input {
    flex: 1;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 10px 25px;
    transition: all 0.3s;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    padding: 10px 25px;
    border: #e8d671;
    color: white;
}

.btn-primary1 {
    background: linear-gradient(135deg, #FFD700 0%, #ebcf2c 100%);
    border: none;
    font-weight: 600;
    padding: 10px 30px;
    transition: all 0.3s;
    box-shadow: 0 4px 10px #FFD700;
}

.btn-primary1:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px #FFD700;
}


.upload-indicator {
    position: absolute;
    top: 0;
    left: 0;
    height: 5px;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s;
}

.upload-progress {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
}

.uploading .upload-progress {
    opacity: 1;
}
.form-control:focus, .form-select:focus{
    border-color: #FFD700;
    box-shadow: 0 0 0 0.2rem #FFD700;
}
